﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ControlExportation.ascx.cs" Inherits="xManagerWebApp.ControlExportation" %>

<asp:DropDownList ID="ddl_ExportationTypes" runat="server" AutoPostBack="True" 
    onselectedindexchanged="ddl_ExportationTypes_SelectedIndexChanged">
</asp:DropDownList>

<asp:GridView ID="gv_reports" EnableViewState="False" EmptyDataText="Empty" 
    runat="server" AllowPaging="True" DataKeyNames="Id"
    AutoGenerateColumns="False" DataSourceID="LinqDataSource1" Width="418px">
    <Columns>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:CheckBox ID="ReportsSelector" runat="server" />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="Name" HeaderText="Name" ReadOnly="True" 
            SortExpression="Name" />
        <asp:BoundField DataField="CreationDate" HeaderText="CreationDate" 
            ReadOnly="True" SortExpression="CreationDate" />
        <asp:BoundField DataField="UserEmail" HeaderText="UserEmail" ReadOnly="True" 
            SortExpression="UserEmail" />
    </Columns>
</asp:GridView>
<%--<asp:LinqDataSource ID="LinqDataSource1" runat="server"
    ContextTypeName="Core.DataAccessDataContext" OrderBy="CreationDate" 
    TableName="ExportatedReportsViews" 
    Where="Path == @Path || Type != @Type">
    <WhereParameters>
        <asp:Parameter Name="Path" Type="String" />
        <asp:ControlParameter ControlID="ddl_ExportationTypes" Name="Type" PropertyName="SelectedValue" 
            Type="String" />
    </WhereParameters>
</asp:LinqDataSource>--%>

<asp:LinqDataSource ID="LinqDataSource1" runat="server" OnSelecting="OnLinqDataSourceSelecting"></asp:LinqDataSource>

<asp:Button ID="bt_Export" runat="server" onclick="bt_Export_Click" 
    Text="Export" />
